Skip to content

Remove redundant cast in _AggregateMatrices#295

Merged
ValerianRey merged 2 commits intomainfrom
remove-redundant-ordered-set-cast
Apr 4, 2025
Merged

Remove redundant cast in _AggregateMatrices#295
ValerianRey merged 2 commits intomainfrom
remove-redundant-ordered-set-cast

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

@ValerianRey ValerianRey commented Apr 3, 2025

  • Remove redundant cast of key_order to OrderedSet in the constructor of _AggregateMatrices

Since the type of key_order is already OrderedSet, there is no point in casting it to OrderedSet. This PR removes this cast to simply use the provided key_order in the constructor of _AggregateMatrices. I also verified that all actual calls to this constructor use a key_order that is of type OrderedSet, and it's the case already. This should thus not change anything.

@ValerianRey ValerianRey added package: autojac cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements labels Apr 3, 2025
@ValerianRey ValerianRey self-assigned this Apr 3, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/torchjd/autojac/_transform/aggregate.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValerianRey ValerianRey changed the title Remove redundant cast Remove redundant cast in _AggregateMatrices Apr 3, 2025
@ValerianRey ValerianRey merged commit 3f78d6d into main Apr 4, 2025
14 checks passed
@ValerianRey ValerianRey deleted the remove-redundant-ordered-set-cast branch April 4, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements package: autojac

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants